package DaEr2_1;

import java.text.Format;
import java.util.Scanner;

public class SuShu {
    public static void main(String[] args) {
        int i;
        Scanner scanner = new Scanner(System.in);
        System.out.println("输入一个数");
        int n = scanner.nextInt();
        Boolean flag = true;
        if (n==1){
            flag=false;
        }
        for (i = 2; i < n; i++) {
            if (n % i == 0) {
                flag = false;
                break;
            }
        }
            if (flag) {
                System.out.println(n + "素数");
            } else {
                System.out.println(n + "不是素数");
            }
        }
    }

